home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / ifl / iflDatabase.z / iflDatabase
Encoding:
Text File  |  1998-10-20  |  9.3 KB  |  265 lines

  1.  
  2.  
  3.  
  4. iiiiffffllllDDDDaaaattttaaaabbbbaaaasssseeee((((3333))))    IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiiffffllllDDDDaaaattttaaaabbbbaaaasssseeee((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiiffffllllDDDDaaaattttaaaabbbbaaaasssseeee - access to image file format database
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      This is a base class with no inheritance.
  13.  
  14.  
  15. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  16.      #include <il/iflDatabase.h>
  17.  
  18.  
  19. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      iflDatabase is a lightweight version of the iflFormat class, with
  21.      abbreviated functionality.  Basically, the information here is what can
  22.      be obtained from variables in the file format database without opening
  23.      the specific DSO.  Looking up an object of this class will never cause a
  24.      DSO to be opened.  The intended use is by apps who know they only need
  25.      the restricted methods provided here.
  26.  
  27.      Refer to the iflFormat(3) man page for more detail on iflFormat
  28.      functionality.
  29.  
  30. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  31.    FFFFoooorrrrmmmmaaaatttt llllooooooookkkkuuuupppp
  32.           static iflDatabase* findNext(int& index)
  33.           static iflDatabase* findByMagic(int fd)
  34.           static iflDatabase* findByFormatName(const char* formatName)
  35.           static iflDatabase* findByFileName(const char* fileName,
  36.                                              int noMatchRule=TRUE)
  37.  
  38.  
  39.    AAAAttttttttrrrriiiibbbbuuuutttteeee qqqquuuueeeerrrriiiieeeessss
  40.           const char* getName()
  41.           const char* getDefaultSuffix()
  42.           const char* getDescription()
  43.           int accessModeIsSupported(int mode)
  44.           const char* getDSOName()
  45.           const char* getInstSubSystem()
  46.  
  47.  
  48.    CCCCoooonnnnvvvveeeerrrrssssiiiioooonnnn ttttoooo iiiiffffllllFFFFoooorrrrmmmmaaaatttt
  49.           iflFormat* getFormat(int openDSOifNecessary = TRUE)
  50.  
  51.  
  52.  
  53. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  54.      aaaacccccccceeeessssssssMMMMooooddddeeeeIIIIssssSSSSuuuuppppppppoooorrrrtttteeeedddd(((())))
  55.  
  56.           int accessModeIsSupported(int mode)
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiiffffllllDDDDaaaattttaaaabbbbaaaasssseeee((((3333))))    IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiiffffllllDDDDaaaattttaaaabbbbaaaasssseeee((((3333))))
  71.  
  72.  
  73.  
  74.           This member function tells whether the given access mode (which must
  75.           be one of _O__R_D_O_N_L_Y, _O__W_R_O_N_L_Y, or _O__R_D_W_R) is supported by the
  76.           subclass.
  77.  
  78.      ffffiiiinnnnddddBBBByyyyFFFFiiiilllleeeeNNNNaaaammmmeeee(((())))
  79.  
  80.           static iflDatabase* findByFileName(const char* fileName,
  81.                                              int noMatchRule=TRUE)
  82.  
  83.  
  84.           This static class member function is used to look up an image file
  85.           format by file name, where the file name is given by the _f_i_l_e_N_a_m_e
  86.           argument.  This is accomplished by matching the tail end of _f_i_l_e_N_a_m_e
  87.           against each value of the suffixes variable given for each image
  88.           file format in the FTR database.  The _n_o_M_a_t_c_h_R_u_l_e argument can be
  89.           used to limit searching to those formats that have no match rule.
  90.  
  91.      ffffiiiinnnnddddBBBByyyyFFFFoooorrrrmmmmaaaattttNNNNaaaammmmeeee(((())))
  92.  
  93.           static iflDatabase* findByFormatName(const char* formatName)
  94.  
  95.  
  96.           This static class member function is used to look up an image file
  97.           format by name, where the name is given by the _f_o_r_m_a_t_N_a_m_e argument.
  98.  
  99.      ffffiiiinnnnddddBBBByyyyMMMMaaaaggggiiiicccc(((())))
  100.  
  101.           static iflDatabase* findByMagic(int fd)
  102.  
  103.  
  104.           This static class member function is used to look up an image file
  105.           format by magic number of a given file that is open for reading with
  106.           the file descriptor, _f_d.
  107.  
  108.      ffffiiiinnnnddddNNNNeeeexxxxtttt(((())))
  109.  
  110.           static iflDatabase* findNext(int& index)
  111.  
  112.  
  113.           This static class member function is used to step through the
  114.           (static, lazily created) list of supported file formats.
  115.  
  116.      To start searching initialize the _i_n_d_e_x paramter to zero.  It will be
  117.      automatically updated by each call so that successive calls will iterate
  118.      through all available formats.  If there are no more formats, the
  119.      function returns NULL.
  120.  
  121.           The following example prints the names of all supported formats:
  122.  
  123.               iflDatabase *db;
  124.               int index = 0;
  125.               while ((db = iflDatabase::findNext(index)) != NULL)
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiiffffllllDDDDaaaattttaaaabbbbaaaasssseeee((((3333))))    IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiiffffllllDDDDaaaattttaaaabbbbaaaasssseeee((((3333))))
  137.  
  138.  
  139.  
  140.                   printf("%s0, db->getName());
  141.  
  142.  
  143.      ggggeeeettttDDDDSSSSOOOONNNNaaaammmmeeee(((())))
  144.  
  145.           const char* getDSOName()
  146.  
  147.  
  148.           This member function returns the 'soname' for the DSO that
  149.           implements this format (used internally to pass to ddddllllooooppppeeeennnn()).
  150.  
  151.      ggggeeeettttDDDDeeeeffffaaaauuuullllttttSSSSuuuuffffffffiiiixxxx(((())))
  152.  
  153.           const char* getDefaultSuffix()
  154.  
  155.  
  156.           This member function returns the default filename suffix (the first
  157.           suffix listed in the "suffixes" declaration for a format in the IFL
  158.           format database). The returned value is a pointer to a static string
  159.           that is valid forever. Note that the returned value may be NULL.
  160.  
  161.      ggggeeeettttDDDDeeeessssccccrrrriiiippppttttiiiioooonnnn(((())))
  162.  
  163.           const char* getDescription()
  164.  
  165.  
  166.           This member function returns the format description, or NULL if
  167.           there is none.
  168.  
  169.      ggggeeeettttFFFFoooorrrrmmmmaaaatttt(((())))
  170.  
  171.           iflFormat* getFormat(int openDSOifNecessary = TRUE)
  172.  
  173.  
  174.           This method returns the full iflFormat correspnding to this
  175.           iflDatabase object.  This may involve some overhead the first time a
  176.           particular format is accessed (opening the DSO and such).
  177.  
  178.      ggggeeeettttIIIInnnnssssttttSSSSuuuubbbbSSSSyyyysssstttteeeemmmm(((())))
  179.  
  180.           const char* getInstSubSystem()
  181.  
  182.  
  183.           This member function returns the inst sub-system that must be
  184.           installed to use this format.  This is used internally to format
  185.           error messages.
  186.  
  187.      ggggeeeettttNNNNaaaammmmeeee(((())))
  188.  
  189.           const char* getName()
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. iiiiffffllllDDDDaaaattttaaaabbbbaaaasssseeee((((3333))))    IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiiffffllllDDDDaaaattttaaaabbbbaaaasssseeee((((3333))))
  203.  
  204.  
  205.  
  206.           This member function returns the format name, which is a pointer to
  207.           a static string that is valid forever.
  208.  
  209. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  210.      iflFormat
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.